(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
"use strict";

exports.__esModule = true;
/** 
 * 检测浏览器是否在safari里
 */
var isSafari = exports.isSafari = function isSafari() {
  return !!navigator.userAgent.match(/safari/i) && !navigator.userAgent.match(/chrome/i) && typeof document.body.style.webkitFilter !== "undefined" && !window.chrome;
};

/** 
 * 屏幕的大小
 */
var detectMediaMatches = exports.detectMediaMatches = function detectMediaMatches(mediaquery) {
  return window.matchMeda && window.matchMeda(mediaquery).matches;
};

/** 
 * userAgent 像 weixin
 */
var isLikeWeixin = exports.isLikeWeixin = function isLikeWeixin() {
  return (/micromessenger/.test(navigator.userAgent.toLowerCase())
  );
};
},{}],2:[function(require,module,exports){
"use strict";

exports.__esModule = true;
/**
 * 转变一个参数变成array
 * 
 * @param {*} val 
 */
var toArray = exports.toArray = function toArray(val) {
  return Array.isArray(val) ? val : [val];
};
},{}],3:[function(require,module,exports){
'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var isMergeableObject = function () {
	return function isMergeableObject(value) {
		return isNonNullObject(value) && !isSpecial(value);
	};

	function isNonNullObject(value) {
		return !!value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object';
	}

	function isSpecial(value) {
		var stringValue = Object.prototype.toString.call(value);

		return stringValue === '[object RegExp]' || stringValue === '[object Date]' || isReactElement(value);
	}

	var canUseSymbol = false;
	var REACT_ELEMENT_TYPE = 0xeac7;
	try {
		// canUseSymbol = typeof Symbol === 'function' && Symbol.for
		// if (canUseSymbol) {
		//     REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
		// }
	} catch (e) {}

	function isReactElement(value) {
		return value.$$typeof === REACT_ELEMENT_TYPE;
	}
}();

function emptyTarget(val) {
	return Array.isArray(val) ? [] : {};
}

function cloneUnlessOtherwiseSpecified(value, optionsArgument) {
	var clone = !optionsArgument || optionsArgument.clone !== false;

	return clone && isMergeableObject(value) ? deepmerge(emptyTarget(value), value, optionsArgument) : value;
}

function defaultArrayMerge(target, source, optionsArgument) {
	return target.concat(source).map(function (element) {
		return cloneUnlessOtherwiseSpecified(element, optionsArgument);
	});
}

function mergeObject(target, source, optionsArgument) {
	var destination = {};
	if (isMergeableObject(target)) {
		Object.keys(target).forEach(function (key) {
			destination[key] = cloneUnlessOtherwiseSpecified(target[key], optionsArgument);
		});
	}
	Object.keys(source).forEach(function (key) {
		if (!isMergeableObject(source[key]) || !target[key]) {
			destination[key] = cloneUnlessOtherwiseSpecified(source[key], optionsArgument);
		} else {
			destination[key] = deepmerge(target[key], source[key], optionsArgument);
		}
	});
	return destination;
}

function deepmerge(target, source, optionsArgument) {
	var sourceIsArray = Array.isArray(source);
	var targetIsArray = Array.isArray(target);
	var options = optionsArgument || { arrayMerge: defaultArrayMerge };
	var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;

	if (!sourceAndTargetTypesMatch) {
		return cloneUnlessOtherwiseSpecified(source, optionsArgument);
	} else if (sourceIsArray) {
		var arrayMerge = options.arrayMerge || defaultArrayMerge;
		return arrayMerge(target, source, optionsArgument);
	} else {
		return mergeObject(target, source, optionsArgument);
	}
}

deepmerge.all = function deepmergeAll(array, optionsArgument) {
	if (!Array.isArray(array)) {
		throw new Error('first argument should be an array');
	}

	return array.reduce(function (prev, next) {
		return deepmerge(prev, next, optionsArgument);
	}, {});
};

module.exports = deepmerge;
},{}],4:[function(require,module,exports){
'use strict';

exports.__esModule = true;
exports.extendDomPrototpe = extendDomPrototpe;
exports.addStyle = addStyle;
exports.addLink = addLink;
exports.getNaturalSize = getNaturalSize;
exports.createElementByHTML = createElementByHTML;
exports.polyfill = polyfill;
function createElement(content) {
    var wrap = document.createElement('DIV');
    wrap.innerHTML = content;
    if (!wrap.firstElementChild) throw new TypeError('after \'' + content + '\' is an illegal html tag string.');
    return wrap.firstElementChild;
}

var scopeStyles = exports.scopeStyles = {};

var elementPrototype = exports.elementPrototype = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : Element.prototype;

var auiFindSelectorAll = function auiFindSelectorAll(selector) {
    if (!this || this === null) {
        return;
    }
    if (/(^\s*|,\s*)>/.test(selector)) {
        if (!this.id) {
            this.id = 'ID_' + new Date().getTime();
            var removeId = true;
        }
        selector = selector.replace(/(^\s*|,\s*)>/g, '$1#' + this.id + ' >');
        var result = document.querySelectorAll(selector);
        if (removeId) {
            this.id = null;
        }
        return result;
    } else {
        return this.querySelectorAll(selector);
    }
};

var auiFindSelector = function auiFindSelector(selector) {
    var res = this.auiFindSelectorAll(selector);
    if (res.length < 1) {
        return null;
    }
    return res[0];
};

var auiToggleAttribute = function auiToggleAttribute(key, value) {
    if (this.hasAttribute(key)) {
        this.removeAttribute(key);
        return false;
    } else {
        this.setAttribute(key, value);
        return true;
    }
};

var auiAddOnceClass = function auiAddOnceClass(name) {
    if (this.classList) {
        if (!this.classList.contains(name)) {
            this.classList.add(name);
        }
    }
};

var auiRemoveOnceClass = function auiRemoveOnceClass(name) {
    if (this.classList) {
        if (this.classList.contains(name)) {
            this.classList.remove(name);
        }
    }
};

var auiGetAttribute = function auiGetAttribute(name, defaultval) {
    var ret = this.getAttribute(name);
    if (ret === null) {
        if (defaultval) {
            return defaultval;
        }
        return null;
    }
    return ret;
};

var auiHeight = function auiHeight() {
    return getComputedStyle(this).height;
};

var auiWidth = function auiWidth() {
    return getComputedStyle(this).width;
};

/**
 * Removes an event listener from an element.
 */
var auiOff = exports.auiOff = function auiOff(evt, fn) {
    var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

    this.removeEventListener(evt, fn, opts);
};

/**
 * Adds an event listener to an element with the ability to use event delegation.
 */
var auiOn = exports.auiOn = function auiOn(evt, fn) {
    var opts = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

    var delegatorFn = function delegatorFn(e) {
        return e.target.matches(opts.target) && fn.call(e.target, e);
    };
    this.addEventListener(evt, opts.target ? delegatorFn : fn, opts.options || false);
    if (opts.target) return delegatorFn;
};

function extendDomPrototpe(key, func) {
    document[key] = func;
    elementPrototype[key] = func;
}

var getIEVersion = exports.getIEVersion = function getIEVersion() {
    if (new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})").exec(navigator.userAgent) != null) {
        return parseFloat(RegExp.$1);
    } else {
        return -1;
    }
};

/**
 * 添加一个style
 *
 * @param key
 * @param css
 * @param once
 */
function addStyle(key, css) {
    var once = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;

    if (!scopeStyles[key] && once) {
        var head = document.head || document.getElementsByTagName('head')[0];
        var style = document.createElement('style');
        var id = "scopedcss_" + key;

        style.id = id;
        style.type = 'text/css';
        if (style.styleSheet) {
            style.styleSheet.cssText = css;
        } else {
            style.appendChild(document.createTextNode(css));
        }

        scopeStyles[key] = style;
        head.appendChild(style);
    }
}

/**
 * 添加一个link
 *
 * @param href
 * @param rel
 */
function addLink(href) {
    var rel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "stylesheet";

    var head = document.head || document.getElementsByTagName('head')[0];
    var link = document.createElement("link");
    link.rel = rel;
    link.href = href;
    head.appendChild(link);
}

var global_hack_img = new Image();
/**
 * 获得图片原始大小
 * 
 * @param {*} img 
 */
function getNaturalSize(img) {
    var naturalSize = {};
    if (img.naturalWidth && img.naturalHeight) {
        naturalSize.width = img.naturalWidth;
        naturalSize.height = img.naturalHeight;
    } else {
        global_hack_img.src = img.src;
        naturalSize.width = global_hack_img.width;
        naturalSize.height = global_hack_img.height;
    }
    return naturalSize;
}

/** 
* Creates an element from a string 
*/
function createElementByHTML() {
    var el = document.createElement('div');
    el.innerHTML = str;
    return el.firstElementChild;
}

/**
 * Returns true if the element specified is visible in the viewport, false otherwise.
 * 
 * @param {*} el 
 * @param {*} partiallyVisible 
 */
var elementIsVisibleInViewport = exports.elementIsVisibleInViewport = function elementIsVisibleInViewport(el) {
    var partiallyVisible = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

    var _el$getBoundingClient = el.getBoundingClientRect(),
        top = _el$getBoundingClient.top,
        left = _el$getBoundingClient.left,
        bottom = _el$getBoundingClient.bottom,
        right = _el$getBoundingClient.right;

    var _window = window,
        innerHeight = _window.innerHeight,
        innerWidth = _window.innerWidth;

    return partiallyVisible ? (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth) : top >= 0 && left >= 0 && bottom <= innerHeight && right <= innerWidth;
};

/**
 * Returns the scroll position of the current page.
 */
var getScrollPosition = exports.getScrollPosition = function getScrollPosition() {
    var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window;
    return {
        x: el.pageXOffset !== undefined ? el.pageXOffset : el.scrollLeft,
        y: el.pageYOffset !== undefined ? el.pageYOffset : el.scrollTop
    };
};

/**
 * Creates a hash for a value using the SHA-256 algorithm. Returns a promise.
 */
var hashBrowser = exports.hashBrowser = function hashBrowser(val) {
    return crypto.subtle.digest('SHA-256', new TextEncoder('utf-8').encode(val)).then(function (h) {
        var hexes = [],
            view = new DataView(h);
        for (var i = 0; i < view.byteLength; i += 4) {
            hexes.push(('00000000' + view.getUint32(i).toString(16)).slice(-8));
        }return hexes.join('');
    });
};

/**
 * Returns a new MutationObserver and runs the provided callback for each mutation on the specified element.
 */
var observeMutations = exports.observeMutations = function observeMutations(element, callback, options) {
    var observer = new MutationObserver(function (mutations) {
        return mutations.forEach(function (m) {
            return callback(m);
        });
    });
    observer.observe(element, Object.assign({
        childList: true,
        attributes: true,
        attributeOldValue: true,
        characterData: true,
        characterDataOldValue: true,
        subtree: true
    }, options));
    return observer;
};

var onUserInputChange = exports.onUserInputChange = function onUserInputChange(callback) {
    var type = 'mouse',
        lastTime = 0;
    var mousemoveHandler = function mousemoveHandler() {
        var now = performance.now();
        if (now - lastTime < 20) type = 'mouse', callback(type), document.removeEventListener('mousemove', mousemoveHandler);
        lastTime = now;
    };
    document.addEventListener('touchstart', function () {
        if (type === 'touch') return;
        type = 'touch', callback(type), document.addEventListener('mousemove', mousemoveHandler);
    });
};

var runAsync = exports.runAsync = function runAsync(fn) {
    var worker = new Worker(URL.createObjectURL(new Blob(['postMessage((' + fn + ')());']), {
        type: 'application/javascript; charset=utf-8'
    }));
    return new Promise(function (res, rej) {
        worker.onmessage = function (_ref) {
            var data = _ref.data;

            res(data), worker.terminate();
        };
        worker.onerror = function (err) {
            rej(err), worker.terminate();
        };
    });
};

var scrollToTop = exports.scrollToTop = function scrollToTop() {
    var c = document.documentElement.scrollTop || document.body.scrollTop;
    if (c > 0) {
        window.requestAnimationFrame(scrollToTop);
        window.scrollTo(0, c - c / 8);
    }
};

var UUIDGeneratorBrowser = exports.UUIDGeneratorBrowser = function UUIDGeneratorBrowser() {
    return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, function (c) {
        return (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16);
    });
};

function polyfillShear() {

    /**
     * 多行折断 
     * 
     * @param target 
     * @param line_count 
     * @param after_html 
     * 
     * @example 
     *  document.auiShear(document.getElementById('target'), 3);
     *  document.auishear(document.getElementById('target'),  3, '<span>（展开）</span>');
     */
    document.auiShear = function (target) {
        var line_count = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
        var after_html = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';

        var sel = window.getSelection();

        var full_html = target.innerHTML;
        var full_text = target.textContent;

        sel.selectAllChildren(target);
        sel.collapseToStart();

        for (var i = 0; i < line_count; i++) {
            sel.modify('extend', 'right', 'character');
            sel.modify('extend', 'right', 'lineboundary');
            if (!target.contains(sel.getRangeAt(0).endContainer)) {
                sel.selectAllChildren(target);
                break;
            }
        }

        var cut_node = sel.getRangeAt(0).cloneContents();
        var wrap = document.createElement('DIV');
        wrap.appendChild(cut_node);
        var cut_html = wrap.innerHTML;
        var cut_text = cut_node.textContent;

        target.innerHTML = cut_html;

        sel.selectAllChildren(target);
        sel.collapseToEnd();

        var cut_html_with_after_html = '';
        var cut_text_with_after_html = '';
        var br = createElement('<br/>');
        if (after_html !== '') {
            var insert = createElement(after_html);
            target.appendChild(br);
            target.appendChild(insert);
            var rect = insert.getBoundingClientRect();
            for (var _i = 0; _i < 1000; _i++) {
                sel.modify('extend', 'left', 'character');
                if (sel.getRangeAt(0).getBoundingClientRect().width >= rect.width) {
                    sel.deleteFromDocument();
                    break;
                }
            }
            target.removeChild(br);
            cut_html_with_after_html = target.innerHTML;
            cut_text_with_after_html = target.textContent;
        }

        return {
            full_html: full_html,
            full_text: full_text,
            cut_html: cut_html,
            cut_text: cut_text,
            cut_html_with_after_html: cut_html_with_after_html,
            cut_text_with_after_html: cut_text_with_after_html
        };
    };
}

function polyfillDom() {
    var _div = document.createElement("div");
    document.auiCreateDOM = function (html, attrs) {
        _div.innerHTML = html;
        var dom = _div.children[0];
        for (var key in attrs) {
            dom.setAttribute(key, attrs[key]);
        }
        return dom;
    };
}

function polyfill() {
    extendDomPrototpe("auiFindSelectorAll", auiFindSelectorAll);
    extendDomPrototpe("auiFindSelector", auiFindSelector);
    extendDomPrototpe("auiToggleAttribute", auiToggleAttribute);
    extendDomPrototpe("auiAddOnceClass", auiAddOnceClass);
    extendDomPrototpe("auiRemoveOnceClass", auiRemoveOnceClass);
    extendDomPrototpe("auiGetAttribute", auiGetAttribute);
    extendDomPrototpe("auiWidth", auiWidth);
    extendDomPrototpe("auiHeight", auiHeight);
    extendDomPrototpe("auiOn", auiOn);
    extendDomPrototpe("auiOff", auiOff);
    document.auiIeVersion = getIEVersion();
    polyfillDom();
}
},{}],5:[function(require,module,exports){
'use strict';

exports.__esModule = true;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

/**
 * 可以继承的错误
 */
var ExtendableError = exports.ExtendableError = function (_Error) {
    _inherits(ExtendableError, _Error);

    function ExtendableError(message) {
        _classCallCheck(this, ExtendableError);

        var _this = _possibleConstructorReturn(this, _Error.call(this, message));

        _this.name = _this.constructor.name;
        if (typeof Error.captureStackTrace === 'function') {
            Error.captureStackTrace(_this, _this.constructor);
        } else {
            _this.stack = new Error(message).stack;
        }
        return _this;
    }

    return ExtendableError;
}(Error);
},{}],6:[function(require,module,exports){
'use strict';

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

/**
 * 设置object通过path 没有就创建
 * 
 * @param {*} obj 
 * @param {*} keys 
 * @param {*} val 
 * 
 * @returns obj
 */
function deepSet(obj, keys, val) {
  keys.split && (keys = keys.replace(/\[([^\[\]]*)\]/g, '.$1').split('.'));
  var i = 0,
      j,
      o,
      x,
      len = keys.length;
  while (i < len) {
    o = obj;
    for (j = 0; j < i; j++) {
      o = o[keys[j]];
    }x = o[keys[i]] || {};
    o[keys[i]] = ++i === len ? val : x;
  }
  return obj;
}

var deepGet = function deepGet(from) {
  for (var _len = arguments.length, selectors = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    selectors[_key - 1] = arguments[_key];
  }

  return [].concat(selectors).map(function (s) {
    return s.replace(/\[([^\[\]]*)\]/g, '.$1.').split('.').filter(function (t) {
      return t !== '';
    }).reduce(function (prev, cur) {
      return prev && prev[cur];
    }, from);
  });
};

function extendDateFormat() {
  // Defining locale
  Date.shortMonths = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
  Date.longMonths = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
  Date.shortDays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
  Date.longDays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
  // Defining patterns
  var replaceChars = {
    // Day
    d: function d() {
      var d = this.getDate();return (d < 10 ? '0' : '') + d;
    },
    D: function D() {
      return Date.shortDays[this.getDay()];
    },
    j: function j() {
      return this.getDate();
    },
    l: function l() {
      return Date.longDays[this.getDay()];
    },
    N: function N() {
      var N = this.getDay();return N === 0 ? 7 : N;
    },
    S: function S() {
      var S = this.getDate();return S % 10 === 1 && S !== 11 ? 'st' : S % 10 === 2 && S !== 12 ? 'nd' : S % 10 === 3 && S !== 13 ? 'rd' : 'th';
    },
    w: function w() {
      return this.getDay();
    },
    z: function z() {
      var d = new Date(this.getFullYear(), 0, 1);return Math.ceil((this - d) / 86400000);
    },
    // Week
    W: function W() {
      var target = new Date(this.valueOf());
      var dayNr = (this.getDay() + 6) % 7;
      target.setDate(target.getDate() - dayNr + 3);
      var firstThursday = target.valueOf();
      target.setMonth(0, 1);
      if (target.getDay() !== 4) {
        target.setMonth(0, 1 + (4 - target.getDay() + 7) % 7);
      }
      var retVal = 1 + Math.ceil((firstThursday - target) / 604800000);

      return retVal < 10 ? '0' + retVal : retVal;
    },
    // Month
    F: function F() {
      return Date.longMonths[this.getMonth()];
    },
    m: function m() {
      var m = this.getMonth();return (m < 9 ? '0' : '') + (m + 1);
    },
    M: function M() {
      return Date.shortMonths[this.getMonth()];
    },
    n: function n() {
      return this.getMonth() + 1;
    },
    t: function t() {
      var year = this.getFullYear();
      var nextMonth = this.getMonth() + 1;
      if (nextMonth === 12) {
        year = year++;
        nextMonth = 0;
      }
      return new Date(year, nextMonth, 0).getDate();
    },
    // Year
    L: function L() {
      var L = this.getFullYear();return L % 400 === 0 || L % 100 !== 0 && L % 4 === 0;
    },
    o: function o() {
      var d = new Date(this.valueOf());d.setDate(d.getDate() - (this.getDay() + 6) % 7 + 3);return d.getFullYear();
    },
    Y: function Y() {
      return this.getFullYear();
    },
    y: function y() {
      return ('' + this.getFullYear()).substr(2);
    },
    // Time
    a: function a() {
      return this.getHours() < 12 ? 'am' : 'pm';
    },
    A: function A() {
      return this.getHours() < 12 ? 'AM' : 'PM';
    },
    B: function B() {
      return Math.floor(((this.getUTCHours() + 1) % 24 + this.getUTCMinutes() / 60 + this.getUTCSeconds() / 3600) * 1000 / 24);
    },
    g: function g() {
      return this.getHours() % 12 || 12;
    },
    G: function G() {
      return this.getHours();
    },
    h: function h() {
      var h = this.getHours();return ((h % 12 || 12) < 10 ? '0' : '') + (h % 12 || 12);
    },
    H: function H() {
      var H = this.getHours();return (H < 10 ? '0' : '') + H;
    },
    i: function i() {
      var i = this.getMinutes();return (i < 10 ? '0' : '') + i;
    },
    s: function s() {
      var s = this.getSeconds();return (s < 10 ? '0' : '') + s;
    },
    v: function v() {
      var v = this.getMilliseconds();return (v < 10 ? '00' : v < 100 ? '0' : '') + v;
    },
    // Timezone
    e: function e() {
      return Intl.DateTimeFormat().resolvedOptions().timeZone;
    },
    I: function I() {
      var DST = null;
      for (var i = 0; i < 12; ++i) {
        var d = new Date(this.getFullYear(), i, 1);
        var offset = d.getTimezoneOffset();

        if (DST === null) DST = offset;else if (offset < DST) {
          DST = offset;break;
        } else if (offset > DST) break;
      }
      return this.getTimezoneOffset() === DST | 0;
    },
    O: function O() {
      var O = this.getTimezoneOffset();return (-O < 0 ? '-' : '+') + (Math.abs(O / 60) < 10 ? '0' : '') + Math.floor(Math.abs(O / 60)) + (Math.abs(O % 60) === 0 ? '00' : (Math.abs(O % 60) < 10 ? '0' : '') + Math.abs(O % 60));
    },
    P: function P() {
      var P = this.getTimezoneOffset();return (-P < 0 ? '-' : '+') + (Math.abs(P / 60) < 10 ? '0' : '') + Math.floor(Math.abs(P / 60)) + ':' + (Math.abs(P % 60) === 0 ? '00' : (Math.abs(P % 60) < 10 ? '0' : '') + Math.abs(P % 60));
    },
    T: function T() {
      var tz = this.toLocaleTimeString(navigator.language, { timeZoneName: 'short' }).split(' ');return tz[tz.length - 1];
    },
    Z: function Z() {
      return -this.getTimezoneOffset() * 60;
    },
    // Full Date/Time
    c: function c() {
      return this.format('Y-m-d\\TH:i:sP');
    },
    r: function r() {
      return this.toString();
    },
    U: function U() {
      return this.getTime() / 1000;
    }

    // Simulates PHP's date function
  };Date.prototype.auiFormat = function (format) {
    var date = this;
    return format.replace(/(\\?)(.)/g, function (_, esc, chr) {
      return esc === '' && replaceChars[chr] ? replaceChars[chr].call(date) : chr;
    });
  };
}

(function () {
  /** 
   * 转换为首字母大写
   */
  String.prototype.auiToFirstUpperCase = function () {
    return this.toLowerCase().replace(/\b(\w)(\w*)/g, function ($0, $1, $2) {
      return $1.toUpperCase() + $2.toLowerCase();
    });
  };
  /** 
   * dashed case to camel case
   */
  String.prototype.auiDashedCaseToCamelCase = function () {
    return this.replace(/-([a-z])/ig, function (all, letter) {
      return letter.toUpperCase();
    });
  };
  /** 
   * camel case to dashed case
   */
  String.prototype.auiCamelCaseToDashedCase = function () {
    return this.replace(/([a-zA-Z])(?=[A-Z])/g, '$1-').toLowerCase();
  };
  /**
  * 设置object deepkeys
  * 
  * @param {Object} obj 
  * @param {String} path - object deepkeys
  * @param {*} val 
  * @param {*} val 
  */
  Object.auiSetByPath = function (obj, path, val) {
    return deepSet(obj, path, val);
  };
  /**
   * 通过object path得到值
   * 
   * @param {Object} obj 
   * @param {String} path 
   */
  Object.auiGetByPath = function (obj, path) {
    var ret = deepGet(obj, path);
    if (ret) {
      return ret[0];
    }
    return null;
  };
  /**
   * 获取数组最后一个
   */
  Object.defineProperty(Array.prototype, "auiEnd", {
    get: function get() {
      if (this.length > 0) {
        return this[this.length - 1];
      }
      return undefined;
    }
  });
  /**
   * 检测object是否是一个object
   * 
   * @param {*} obj 
   */
  Object.auiIsObject = function (obj) {
    return (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && Object.prototype.toString.call(obj) === "[object Object]";
  };
  /**
   * 给date扩展format方法 
   */
  extendDateFormat();
})();
},{}],7:[function(require,module,exports){
"use strict";

exports.__esModule = true;
exports.isPhoneWeixin = exports.isPhoneSize = exports.getScreenWidth = exports.__webStorageCache = exports.browser = exports.Error = exports.logger = exports.debug = exports.validate = exports.cast = exports.utils = undefined;
exports.setClipboardData = setClipboardData;
exports.setStorageSync = setStorageSync;
exports.getStorageSync = getStorageSync;
exports.removeStorageSync = removeStorageSync;
exports.updateStorageSync = updateStorageSync;
exports.clearStorageSync = clearStorageSync;

require("./global");

var _error = require("./error");

var _node = require("./node");

var node = _interopRequireWildcard(_node);

var _browser2 = require("./browser");

var _browser = _interopRequireWildcard(_browser2);

var _webCacheStorage = require("./web-cache-storage");

var _webCacheStorage2 = _interopRequireDefault(_webCacheStorage);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
// { utils, cast, validate, debug, logger }


var _utils = node.utils;
_utils.run = function (expression) {
    var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window;

    return Function.apply(Function, ['context', "with(context) { return " + expression + " }"])(context, expression);
};
var utils = exports.utils = _utils;

var cast = exports.cast = node.cast;
var validate = exports.validate = node.validate;
var debug = exports.debug = node.debug;
var logger = exports.logger = node.logger;
var Error = exports.Error = node.Error;

var browser = exports.browser = _browser;

function copyTextToClipboard(text) {
    var ret = false;
    var textArea = document.createElement("textarea");

    //
    // *** This styling is an extra step which is likely not required. ***
    //
    // Why is it here? To ensure:
    // 1. the element is able to have focus and selection.
    // 2. if element was to flash render it has minimal visual impact.
    // 3. less flakyness with selection and copying which **might** occur if
    //    the textarea element is not visible.
    //
    // The likelihood is the element won't even render, not even a flash,
    // so some of these are just precautions. However in IE the element
    // is visible whilst the popup box asking the user for permission for
    // the web page to copy to the clipboard.
    //

    // Place in top-left corner of screen regardless of scroll position.
    textArea.style.position = 'fixed';
    textArea.style.top = 0;
    textArea.style.left = 0;

    // Ensure it has a small width and height. Setting to 1px / 1em
    // doesn't work as this gives a negative w/h on some browsers.
    textArea.style.width = '2em';
    textArea.style.height = '2em';

    // We don't need padding, reducing the size if it does flash render.
    textArea.style.padding = 0;

    // Clean up any borders.
    textArea.style.border = 'none';
    textArea.style.outline = 'none';
    textArea.style.boxShadow = 'none';

    // Avoid flash of white box if rendered for any reason.
    textArea.style.background = 'transparent';

    textArea.value = text;

    document.body.appendChild(textArea);

    textArea.select();

    try {
        ret = document.execCommand('copy');
        // var msg = successful ? 'successful' : 'unsuccessful';
        // console.log('Copying text command was ' + msg);
    } catch (err) {
        // console.log('Oops, unable to copy');
    }

    document.body.removeChild(textArea);
    return ret;
}

var ClipboardDataError = function (_ExtendableError) {
    _inherits(ClipboardDataError, _ExtendableError);

    function ClipboardDataError() {
        _classCallCheck(this, ClipboardDataError);

        return _possibleConstructorReturn(this, _ExtendableError.call(this, "set ClipboardData error"));
    }

    return ClipboardDataError;
}(_error.ExtendableError);

/**
 * wx
 * Google Chrome 44, Firefox 42.0a1 and IE 11.0.8600.17814.
 * ali (*)
 *
 * @throws ClipboardDataError
 * @param data
 * @return {Promise<any>}
 */


function setClipboardData(data) {
    var error = new ClipboardDataError();
    return new Promise(function (resolve, reject) {
        var isSuccess = copyTextToClipboard(data);
        if (isSuccess) {
            resolve();
        } else {
            reject(error);
        }
    });
}

var __webStorageCache = exports.__webStorageCache = new _webCacheStorage2["default"]();
window.__webStorageCache = __webStorageCache;

/** 
 * 得到屏幕的大小
 */
var getScreenWidth = exports.getScreenWidth = function getScreenWidth() {
    return screen.width > 0 ? screen.width : 0;
};

var isPhoneSize = exports.isPhoneSize = function isPhoneSize() {
    var maxWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 768;

    return getScreenWidth() < maxWidth && this.browser.detectMediaMacthes('(max-device-width: 769px)');
};

var isPhoneWeixin = exports.isPhoneWeixin = function isPhoneWeixin() {
    return isPhoneSize() && this.browser.isLikeWeixin();
};

/**
 * 设置storage
 * 
 * @param {String} key 
 * @param {Any} data 
 * @param {Object} options 
 */
function setStorageSync(key, data, options) {
    if (options && options.expire && options.expire instanceof Date) {
        options.exp = options.expire.valueOf() - new Date().valueOf();
    }
    return __webStorageCache.set(key, data, options);
}

/**
 * 获得storage中某个key的值
 * 
 * @param {String} key 
 */
function getStorageSync(key) {
    return __webStorageCache.get(key);
}

/**
 * 删除某个值
 * 
 * @param {String} key 
 */
function removeStorageSync(key) {
    return __webStorageCache["delete"](key);
}

/**
 * 更新某个值
 * 
 * @param {*} key 
 * @param {*} value 
 * @param {*} options 
 * 
 * @returns {Boolean} isUpdated 
 */
function updateStorageSync(key, value, options) {
    return __webStorageCache.replace(key, value, options);
}

/** 
 * 清空storage  
 */
function clearStorageSync() {
    return __webStorageCache.clear();
}
},{"./browser":1,"./error":5,"./global":6,"./node":9,"./web-cache-storage":12}],8:[function(require,module,exports){
"use strict";

exports.__esModule = true;
exports.createLogger = createLogger;
function createLogger() {
    var debug = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;

    var _logger = {
        debug: debug
    };
    ["log", "warn", "error"].forEach(function (level) {
        _logger[level] = function () {
            if (this.debug) {
                return console[level].apply(console, Array.from(arguments));
            }
        };
    });
    return _logger;
}
},{}],9:[function(require,module,exports){
"use strict";

exports.__esModule = true;
exports.Error = exports.logger = exports.debug = exports.validate = exports.cast = exports.utils = undefined;

var _error = require("./error");

var _utils2 = require("./utils");

var _utils = _interopRequireWildcard(_utils2);

var _cast2 = require("./cast");

var _cast = _interopRequireWildcard(_cast2);

var _index = require("./validate/index");

var _logger = require("./logger");

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj["default"] = obj; return newObj; } }

var utils = exports.utils = _utils;
var cast = exports.cast = _cast;

_index._validate.isNil = function (value) {
    return value === undefined || value === null;
};
var validate = exports.validate = _index._validate;
var debug = exports.debug = false;
var logger = exports.logger = (0, _logger.createLogger)();
var Error = exports.Error = _error.ExtendableError;
},{"./cast":2,"./error":5,"./logger":8,"./utils":10,"./validate/index":11}],10:[function(require,module,exports){
"use strict";

exports.__esModule = true;
exports.getURLParameters = exports.coalesceFactory = exports.deepMerge = undefined;

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; // import jsep from "./jsep";
// import evaluate from 'static-eval';

/**
 * run a expression
 *
 * @param expression
 * @param args
 */
// export function run(expression, args) {
//     let parse_tree = jsep(expression);
//     return evaluate(parse_tree, args);
// }

exports.parseObjToOptions = parseObjToOptions;
exports.parseOptionsToObj = parseOptionsToObj;
exports.sleep = sleep;
exports.chartoUnicode = chartoUnicode;
exports.param = param;

var _deepmerge = require("./deepmerge");

var _deepmerge2 = _interopRequireDefault(_deepmerge);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var deepMerge = exports.deepMerge = _deepmerge2["default"];

function toString(type) {
    return Object.prototype.toString.call(type);
}

function isObject(obj) {
    return (typeof obj === "undefined" ? "undefined" : _typeof(obj)) === 'object' && toString(obj) === "[object Object]";
}

// export let isArray = Array.isArray || function (obj) {
//     /*istanbul ignore next:cant test*/
//     return toString(obj) === '[object Array]';
// };

// export function isBoolean(obj) {
//     return typeof obj === 'boolean' || toString(obj) === '[object Boolean]';
// }

// export function isNil(value) {
//     return value === undefined || value === null;
// }

// export function isFunction(value) {
//     return typeof value === 'function' && toString(value) === "[object Function]";
// }

/**
 * 返回一个自定义合并函数，它返回从提供的参数验证函数返回true的第一个参数。使用数组。 find()返回第一个参数，它从提供的参数验证函数返回true。
 * 
 * @param {*} valid 
 */
var coalesceFactory = exports.coalesceFactory = function coalesceFactory(valid) {
    return function () {
        for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
            args[_key] = arguments[_key];
        }

        return args.find(valid);
    };
};

var _getURLParameters = function _getURLParameters(url) {
    return (url.match(/([^?=&]+)(=([^&]*))/g) || []).reduce(function (a, v) {
        return a[v.slice(0, v.indexOf('='))] = v.slice(v.indexOf('=') + 1), a;
    }, {});
};

/**
 * 获取url字符串
 * 
 * @param {*} url 
 * @param {*} isDecode 
 */
var getURLParameters = exports.getURLParameters = function getURLParameters(url) {
    var isDecode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;

    var param = _getURLParameters(url);
    if (isDecode && decodeURIComponent) {
        for (var key in param) {
            param[key] = decodeURIComponent(param[key]);
        }
    }
    return param;
};

/**
 * parse obj to a option
 *
 * { a: 1 }
 *
 * [
 *     {
 *          name: "a",
 *          value: 1
 *     }
 * ]
 *
 * @param obj
 * @returns {Array}
 */
function parseObjToOptions(obj) {
    if (isObject(obj)) {
        return Object.entries(obj).map(function (v) {
            return {
                name: v[0],
                value: v[1]
            };
        });
    }
    return [];
}

/**
 * parse options to obj
 *
 * @param options
 * @returns {{}}
 */
function parseOptionsToObj(options) {
    var ret = {};
    options.forEach(function (v) {
        ret[v.name] = v.value;
    });
    return ret;
}

/**
 * js 阻塞线程
 *
 * @param delay
 */
function sleep(delay) {
    var start = new Date().getTime();
    while (new Date().getTime() - start < delay) {
        continue;
    }
}

/**
 * 转换中文到unicode
 * 
 * @param {String} s 
 */
function chartoUnicode(s) {
    return s.replace(/([\u4E00-\u9FA5])/g, function () {
        return "\\u" + RegExp["$1"].charCodeAt(0).toString(16);
    });
}

/**
 * 使用replace隐藏某段字符串部分内容
 * 
 * @deprecated
 * 
 * @param {*} str 
 * @param {*} start 
 * @param {*} end 
 * @param {*} replace 
 */
// export function setStringUnvisible(str, start, end, replace="*") { 
//     return str.slice(0, start) + replace.repeat(end - start) + str.slice(end, str.length);  
// }

/**
 * like $.param
 * 
 * @param {Object} a 
 */
function param(a) {
    return Object.keys(a).map(function (k) {
        return encodeURIComponent(k) + '=' + encodeURIComponent(a[k]);
    }).join('&');
}
},{"./deepmerge":3}],11:[function(require,module,exports){
"use strict";

var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
    return typeof obj === "undefined" ? "undefined" : _typeof2(obj);
} : function (obj) {
    return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj);
};

/*!
 * validate.js 0.11.1
 *
 * (c) 2013-2016 Nicklas Ansman, 2013 Wrapp
 * Validate.js may be freely distributed under the MIT license.
 * For all details and documentation:
 * http://validatejs.org/
 */

// The main function that calls the validators specified by the constraints.
// The options are the following:
//   - format (string) - An option that controls how the returned value is formatted
//     * flat - Returns a flat array of just the error messages
//     * grouped - Returns the messages grouped by attribute (default)
//     * detailed - Returns an array of the raw validation data
//   - fullMessages (boolean) - If `true` (default) the attribute name is prepended to the error.
//
// Please note that the options are also passed to each validator.
var validate = function validate(attributes, constraints, options) {
    options = v.extend({}, v.options, options);

    var results = v.runValidations(attributes, constraints, options),
        attr,
        validator;

    for (attr in results) {
        for (validator in results[attr]) {
            if (v.isPromise(results[attr][validator])) {
                throw new Error("Use validate.async if you want support for promises");
            }
        }
    }
    return validate.processValidationResults(results, options);
};

var v = validate;

// Copies over attributes from one or more sources to a single destination.
// Very much similar to underscore's extend.
// The first argument is the target object and the remaining arguments will be
// used as sources.
v.extend = function (obj) {
    [].slice.call(arguments, 1).forEach(function (source) {
        for (var attr in source) {
            obj[attr] = source[attr];
        }
    });
    return obj;
};

v.extend(validate, {
    // This is the version of the library as a semver.
    // The toString function will allow it to be coerced into a string
    version: {
        major: 0,
        minor: 11,
        patch: 1,
        metadata: null,
        toString: function toString() {
            var version = v.format("%{major}.%{minor}.%{patch}", v.version);
            if (!v.isEmpty(v.version.metadata)) {
                version += "+" + v.version.metadata;
            }
            return version;
        }
    },

    // Below is the dependencies that are used in validate.js

    // The constructor of the Promise implementation.
    // If you are using Q.js, RSVP or any other A+ compatible implementation
    // override this attribute to be the constructor of that promise.
    // Since jQuery promises aren't A+ compatible they won't work.
    Promise: typeof Promise !== "undefined" ? Promise : /* istanbul ignore next */null,

    EMPTY_STRING_REGEXP: /^\s*$/,

    // Runs the validators specified by the constraints object.
    // Will return an array of the format:
    //     [{attribute: "<attribute name>", error: "<validation result>"}, ...]
    runValidations: function runValidations(attributes, constraints, options) {
        var results = [],
            attr,
            validatorName,
            value,
            validators,
            validator,
            validatorOptions,
            error;

        if (v.isDomElement(attributes) || v.isJqueryElement(attributes)) {
            attributes = v.collectFormValues(attributes);
        }

        // Loops through each constraints, finds the correct validator and run it.
        for (attr in constraints) {
            value = v.getDeepObjectValue(attributes, attr);
            // This allows the constraints for an attribute to be a function.
            // The function will be called with the value, attribute name, the complete dict of
            // attributes as well as the options and constraints passed in.
            // This is useful when you want to have different
            // validations depending on the attribute value.
            validators = v.result(constraints[attr], value, attributes, attr, options, constraints);

            for (validatorName in validators) {
                validator = v.validators[validatorName];

                if (!validator) {
                    error = v.format("Unknown validator %{name}", { name: validatorName });
                    throw new Error(error);
                }

                validatorOptions = validators[validatorName];
                // This allows the options to be a function. The function will be
                // called with the value, attribute name, the complete dict of
                // attributes as well as the options and constraints passed in.
                // This is useful when you want to have different
                // validations depending on the attribute value.
                validatorOptions = v.result(validatorOptions, value, attributes, attr, options, constraints);
                if (!validatorOptions) {
                    continue;
                }
                results.push({
                    attribute: attr,
                    value: value,
                    validator: validatorName,
                    globalOptions: options,
                    attributes: attributes,
                    options: validatorOptions,
                    error: validator.call(validator, value, validatorOptions, attr, attributes, options)
                });
            }
        }

        return results;
    },

    // Takes the output from runValidations and converts it to the correct
    // output format.
    processValidationResults: function processValidationResults(errors, options) {
        errors = v.pruneEmptyErrors(errors, options);
        errors = v.expandMultipleErrors(errors, options);
        errors = v.convertErrorMessages(errors, options);

        var format = options.format || "grouped";

        if (typeof v.formatters[format] === 'function') {
            errors = v.formatters[format](errors);
        } else {
            throw new Error(v.format("Unknown format %{format}", options));
        }

        return v.isEmpty(errors) ? undefined : errors;
    },

    // Runs the validations with support for promises.
    // This function will return a promise that is settled when all the
    // validation promises have been completed.
    // It can be called even if no validations returned a promise.
    async: function async(attributes, constraints, options) {
        options = v.extend({}, v.async.options, options);

        var WrapErrors = options.wrapErrors || function (errors) {
            return errors;
        };

        // Removes unknown attributes
        if (options.cleanAttributes !== false) {
            attributes = v.cleanAttributes(attributes, constraints);
        }

        var results = v.runValidations(attributes, constraints, options);

        return new v.Promise(function (resolve, reject) {
            v.waitForResults(results).then(function () {
                var errors = v.processValidationResults(results, options);
                if (errors) {
                    reject(new WrapErrors(errors, options, attributes, constraints));
                } else {
                    resolve(attributes);
                }
            }, function (err) {
                reject(err);
            });
        });
    },

    single: function single(value, constraints, options) {
        options = v.extend({}, v.single.options, options, {
            format: "flat",
            fullMessages: false
        });
        return v({ single: value }, { single: constraints }, options);
    },

    // Returns a promise that is resolved when all promises in the results array
    // are settled. The promise returned from this function is always resolved,
    // never rejected.
    // This function modifies the input argument, it replaces the promises
    // with the value returned from the promise.
    waitForResults: function waitForResults(results) {
        // Create a sequence of all the results starting with a resolved promise.
        return results.reduce(function (memo, result) {
            // If this result isn't a promise skip it in the sequence.
            if (!v.isPromise(result.error)) {
                return memo;
            }

            return memo.then(function () {
                return result.error.then(function (error) {
                    result.error = error || null;
                });
            });
        }, new v.Promise(function (r) {
            r();
        })); // A resolved promise
    },

    // If the given argument is a call: function the and: function return the value
    // otherwise just return the value. Additional arguments will be passed as
    // arguments to the function.
    // Example:
    // ```
    // result('foo') // 'foo'
    // result(Math.max, 1, 2) // 2
    // ```
    result: function result(value) {
        var args = [].slice.call(arguments, 1);
        if (typeof value === 'function') {
            value = value.apply(null, args);
        }
        return value;
    },

    // Checks if the value is a number. This function does not consider NaN a
    // number like many other `isNumber` functions do.
    isNumber: function isNumber(value) {
        return typeof value === 'number' && !isNaN(value);
    },

    // Returns false if the object is not a function
    isFunction: function isFunction(value) {
        return typeof value === 'function';
    },

    // A simple check to verify that the value is an integer. Uses `isNumber`
    // and a simple modulo check.
    isInteger: function isInteger(value) {
        return v.isNumber(value) && value % 1 === 0;
    },

    // Checks if the value is a boolean
    isBoolean: function isBoolean(value) {
        return typeof value === 'boolean';
    },

    // Uses the `Object` function to check if the given argument is an object.
    isObject: function isObject(obj) {
        return obj === Object(obj);
    },

    // Simply checks if the object is an instance of a date
    isDate: function isDate(obj) {
        return obj instanceof Date;
    },

    // Returns false if the object is `null` of `undefined`
    isDefined: function isDefined(obj) {
        return obj !== null && obj !== undefined;
    },

    // Checks if the given argument is a promise. Anything with a `then`
    // function is considered a promise.
    isPromise: function isPromise(p) {
        return !!p && v.isFunction(p.then);
    },

    isJqueryElement: function isJqueryElement(o) {
        return o && v.isString(o.jquery);
    },

    isDomElement: function isDomElement(o) {
        if (!o) {
            return false;
        }

        if (!o.querySelectorAll || !o.querySelector) {
            return false;
        }

        if (v.isObject(document) && o === document) {
            return true;
        }

        // http://stackoverflow.com/a/384380/699304
        /* istanbul ignore else */
        if ((typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement)) === "object") {
            return o instanceof HTMLElement;
        } else {
            return o && (typeof o === "undefined" ? "undefined" : _typeof(o)) === "object" && o !== null && o.nodeType === 1 && typeof o.nodeName === "string";
        }
    },

    isEmpty: function isEmpty(value) {
        var attr;

        // Null and undefined are empty
        if (!v.isDefined(value)) {
            return true;
        }

        // functions are non empty
        if (v.isFunction(value)) {
            return false;
        }

        // Whitespace only strings are empty
        if (v.isString(value)) {
            return v.EMPTY_STRING_REGEXP.test(value);
        }

        // For arrays we use the length property
        if (v.isArray(value)) {
            return value.length === 0;
        }

        // Dates have no attributes but aren't empty
        if (v.isDate(value)) {
            return false;
        }

        // If we find at least one property we consider it non empty
        if (v.isObject(value)) {
            for (attr in value) {
                return false;
            }
            return true;
        }

        return false;
    },

    // Formats the specified strings with the given values like so:
    // ```
    // format("Foo: %{foo}", {foo: "bar"}) // "Foo bar"
    // ```
    // If you want to write %{...} without having it replaced simply
    // prefix it with % like this `Foo: %%{foo}` and it will be returned
    // as `"Foo: %{foo}"`
    format: v.extend(function (str, vals) {
        if (!v.isString(str)) {
            return str;
        }
        return str.replace(v.format.FORMAT_REGEXP, function (m0, m1, m2) {
            if (m1 === '%') {
                return "%{" + m2 + "}";
            } else {
                return String(vals[m2]);
            }
        });
    }, {
        // Finds %{key} style patterns in the given string
        FORMAT_REGEXP: /(%?)%\{([^\}]+)\}/g
    }),

    // "Prettifies" the given string.
    // Prettifying means replacing [.\_-] with spaces as well as splitting
    // camel case words.
    prettify: function prettify(str) {
        if (v.isNumber(str)) {
            // If there are more than 2 decimals round it to two
            if (str * 100 % 1 === 0) {
                return "" + str;
            } else {
                return parseFloat(Math.round(str * 100) / 100).toFixed(2);
            }
        }

        if (v.isArray(str)) {
            return str.map(function (s) {
                return v.prettify(s);
            }).join(", ");
        }

        if (v.isObject(str)) {
            return str.toString();
        }

        // Ensure the string is actually a string
        str = "" + str;

        return str
        // Splits keys separated by periods
        .replace(/([^\s])\.([^\s])/g, '$1 $2')
        // Removes backslashes
        .replace(/\\+/g, '')
        // Replaces - and - with space
        .replace(/[_-]/g, ' ')
        // Splits camel cased words
        .replace(/([a-z])([A-Z])/g, function (m0, m1, m2) {
            return "" + m1 + " " + m2.toLowerCase();
        }).toLowerCase();
    },

    stringifyValue: function stringifyValue(value) {
        return v.prettify(value);
    },

    isString: function isString(value) {
        return typeof value === 'string';
    },

    isArray: function isArray(value) {
        return {}.toString.call(value) === '[object Array]';
    },

    // Checks if the object is a hash, which is equivalent to an object that
    // is neither an array nor a function.
    isHash: function isHash(value) {
        return v.isObject(value) && !v.isArray(value) && !v.isFunction(value);
    },

    contains: function contains(obj, value) {
        if (!v.isDefined(obj)) {
            return false;
        }
        if (v.isArray(obj)) {
            return obj.indexOf(value) !== -1;
        }
        return value in obj;
    },

    unique: function unique(array) {
        if (!v.isArray(array)) {
            return array;
        }
        return array.filter(function (el, index, array) {
            return array.indexOf(el) == index;
        });
    },

    forEachKeyInKeypath: function forEachKeyInKeypath(object, keypath, callback) {
        if (!v.isString(keypath)) {
            return undefined;
        }

        var key = "",
            i,
            escape = false;

        for (i = 0; i < keypath.length; ++i) {
            switch (keypath[i]) {
                case '.':
                    if (escape) {
                        escape = false;
                        key += '.';
                    } else {
                        object = callback(object, key, false);
                        key = "";
                    }
                    break;

                case '\\':
                    if (escape) {
                        escape = false;
                        key += '\\';
                    } else {
                        escape = true;
                    }
                    break;

                default:
                    escape = false;
                    key += keypath[i];
                    break;
            }
        }

        return callback(object, key, true);
    },

    getDeepObjectValue: function getDeepObjectValue(obj, keypath) {
        if (!v.isObject(obj)) {
            return undefined;
        }

        return v.forEachKeyInKeypath(obj, keypath, function (obj, key) {
            if (v.isObject(obj)) {
                return obj[key];
            }
        });
    },

    // This returns an object with all the values of the form.
    // It uses the input name as key and the value as value
    // So for example this:
    // <input type="text" name="email" value="foo@bar.com" />
    // would return:
    // {email: "foo@bar.com"}
    collectFormValues: function collectFormValues(form, options) {
        var values = {},
            i,
            j,
            input,
            inputs,
            option,
            value;

        if (v.isJqueryElement(form)) {
            form = form[0];
        }

        if (!form) {
            return values;
        }

        options = options || {};

        inputs = form.querySelectorAll("input[name], textarea[name]");
        for (i = 0; i < inputs.length; ++i) {
            input = inputs.item(i);

            if (v.isDefined(input.getAttribute("data-ignored"))) {
                continue;
            }

            value = v.sanitizeFormValue(input.value, options);
            if (input.type === "number") {
                value = value ? +value : null;
            } else if (input.type === "checkbox") {
                if (input.attributes.value) {
                    if (!input.checked) {
                        value = values[input.name] || null;
                    }
                } else {
                    value = input.checked;
                }
            } else if (input.type === "radio") {
                if (!input.checked) {
                    value = values[input.name] || null;
                }
            }
            values[input.name] = value;
        }

        inputs = form.querySelectorAll("select[name]");
        for (i = 0; i < inputs.length; ++i) {
            input = inputs.item(i);
            if (input.multiple) {
                value = [];
                for (j in input.options) {
                    option = input.options[j];
                    if (option.selected) {
                        value.push(v.sanitizeFormValue(option.value, options));
                    }
                }
            } else {
                value = v.sanitizeFormValue(input.options[input.selectedIndex].value, options);
            }
            values[input.name] = value;
        }

        return values;
    },

    sanitizeFormValue: function sanitizeFormValue(value, options) {
        if (options.trim && v.isString(value)) {
            value = value.trim();
        }

        if (options.nullify !== false && value === "") {
            return null;
        }
        return value;
    },

    capitalize: function capitalize(str) {
        if (!v.isString(str)) {
            return str;
        }
        return str[0].toUpperCase() + str.slice(1);
    },

    // Remove all errors who's error attribute is empty (null or undefined)
    pruneEmptyErrors: function pruneEmptyErrors(errors) {
        return errors.filter(function (error) {
            return !v.isEmpty(error.error);
        });
    },

    // In
    // [{error: ["err1", "err2"], ...}]
    // Out
    // [{error: "err1", ...}, {error: "err2", ...}]
    //
    // All attributes in an error with multiple messages are duplicated
    // when expanding the errors.
    expandMultipleErrors: function expandMultipleErrors(errors) {
        var ret = [];
        errors.forEach(function (error) {
            // Removes errors without a message
            if (v.isArray(error.error)) {
                error.error.forEach(function (msg) {
                    ret.push(v.extend({}, error, { error: msg }));
                });
            } else {
                ret.push(error);
            }
        });
        return ret;
    },

    // Converts the error mesages by prepending the attribute name unless the
    // message is prefixed by ^
    convertErrorMessages: function convertErrorMessages(errors, options) {
        options = options || {};

        var ret = [];
        errors.forEach(function (errorInfo) {
            var error = v.result(errorInfo.error, errorInfo.value, errorInfo.attribute, errorInfo.options, errorInfo.attributes, errorInfo.globalOptions);

            if (!v.isString(error)) {
                ret.push(errorInfo);
                return;
            }

            if (error[0] === '^') {
                error = error.slice(1);
            } else if (options.fullMessages !== false) {
                error = v.capitalize(v.prettify(errorInfo.attribute)) + " " + error;
            }
            error = error.replace(/\\\^/g, "^");
            error = v.format(error, { value: v.stringifyValue(errorInfo.value) });
            ret.push(v.extend({}, errorInfo, { error: error }));
        });
        return ret;
    },

    // In:
    // [{attribute: "<attributeName>", ...}]
    // Out:
    // {"<attributeName>": [{attribute: "<attributeName>", ...}]}
    groupErrorsByAttribute: function groupErrorsByAttribute(errors) {
        var ret = {};
        errors.forEach(function (error) {
            var list = ret[error.attribute];
            if (list) {
                list.push(error);
            } else {
                ret[error.attribute] = [error];
            }
        });
        return ret;
    },

    // In:
    // [{error: "<message 1>", ...}, {error: "<message 2>", ...}]
    // Out:
    // ["<message 1>", "<message 2>"]
    flattenErrorsToArray: function flattenErrorsToArray(errors) {
        return errors.map(function (error) {
            return error.error;
        }).filter(function (value, index, self) {
            return self.indexOf(value) === index;
        });
    },

    cleanAttributes: function cleanAttributes(attributes, whitelist) {
        function whitelistCreator(obj, key, last) {
            if (v.isObject(obj[key])) {
                return obj[key];
            }
            return obj[key] = last ? true : {};
        }

        function buildObjectWhitelist(whitelist) {
            var ow = {},
                lastObject,
                attr;
            for (attr in whitelist) {
                if (!whitelist[attr]) {
                    continue;
                }
                v.forEachKeyInKeypath(ow, attr, whitelistCreator);
            }
            return ow;
        }

        function cleanRecursive(attributes, whitelist) {
            if (!v.isObject(attributes)) {
                return attributes;
            }

            var ret = v.extend({}, attributes),
                w,
                attribute;

            for (attribute in attributes) {
                w = whitelist[attribute];

                if (v.isObject(w)) {
                    ret[attribute] = cleanRecursive(ret[attribute], w);
                } else if (!w) {
                    delete ret[attribute];
                }
            }
            return ret;
        }

        if (!v.isObject(whitelist) || !v.isObject(attributes)) {
            return {};
        }

        whitelist = buildObjectWhitelist(whitelist);
        return cleanRecursive(attributes, whitelist);
    },

    // exposeModule: function exposeModule(validate, root, exports, module, define) {
    //     if (exports) {
    //         if (module && module.exports) {
    //             exports = module.exports = validate;
    //         }
    //         exports.validate = validate;
    //     } else {
    //         root.validate = validate;
    //         if (validate.isFunction(define) && define.amd) {
    //             define([], function () {
    //                 return validate;
    //             });
    //         }
    //     }
    //     // window.AUIValidate = validate;
    // },

    warn: function warn(msg) {
        if (typeof console !== "undefined" && console.warn) {
            console.warn("[validate.js] " + msg);
        }
    },

    error: function error(msg) {
        if (typeof console !== "undefined" && console.error) {
            console.error("[validate.js] " + msg);
        }
    }
});

validate.validators = {
    // Presence validates that the value isn't empty
    presence: function presence(value, options) {
        options = v.extend({}, this.options, options);
        if (options.allowEmpty ? !v.isDefined(value) : v.isEmpty(value)) {
            return options.message || this.message || "can't be blank";
        }
    },
    length: function length(value, options, attribute) {
        // Empty values are allowed
        if (!v.isDefined(value)) {
            return;
        }

        options = v.extend({}, this.options, options);

        var is = options.is,
            maximum = options.maximum,
            minimum = options.minimum,
            tokenizer = options.tokenizer || function (val) {
            return val;
        },
            err,
            errors = [];

        value = tokenizer(value);
        var length = value.length;
        if (!v.isNumber(length)) {
            v.error(v.format("Attribute %{attr} has a non numeric value for `length`", { attr: attribute }));
            return options.message || this.notValid || "has an incorrect length";
        }

        // Is checks
        if (v.isNumber(is) && length !== is) {
            err = options.wrongLength || this.wrongLength || "is the wrong length (should be %{count} characters)";
            errors.push(v.format(err, { count: is }));
        }

        if (v.isNumber(minimum) && length < minimum) {
            err = options.tooShort || this.tooShort || "is too short (minimum is %{count} characters)";
            errors.push(v.format(err, { count: minimum }));
        }

        if (v.isNumber(maximum) && length > maximum) {
            err = options.tooLong || this.tooLong || "is too long (maximum is %{count} characters)";
            errors.push(v.format(err, { count: maximum }));
        }

        if (errors.length > 0) {
            return options.message || errors;
        }
    },
    numericality: function numericality(value, options) {
        // Empty values are fine
        if (!v.isDefined(value)) {
            return;
        }

        options = v.extend({}, this.options, options);

        var errors = [],
            name,
            count,
            checks = {
            greaterThan: function greaterThan(v, c) {
                return v > c;
            },
            greaterThanOrEqualTo: function greaterThanOrEqualTo(v, c) {
                return v >= c;
            },
            equalTo: function equalTo(v, c) {
                return v === c;
            },
            lessThan: function lessThan(v, c) {
                return v < c;
            },
            lessThanOrEqualTo: function lessThanOrEqualTo(v, c) {
                return v <= c;
            },
            divisibleBy: function divisibleBy(v, c) {
                return v % c === 0;
            }
        };

        // Strict will check that it is a valid looking number
        if (v.isString(value) && options.strict) {
            var pattern = "^(0|[1-9]\\d*)";
            if (!options.onlyInteger) {
                pattern += "(\\.\\d+)?";
            }
            pattern += "$";

            if (!new RegExp(pattern).test(value)) {
                return options.message || options.notValid || this.notValid || this.message || "must be a valid number";
            }
        }

        // Coerce the value to a number unless we're being strict.
        if (options.noStrings !== true && v.isString(value) && !v.isEmpty(value)) {
            value = +value;
        }

        // If it's not a number we shouldn't continue since it will compare it.
        if (!v.isNumber(value)) {
            return options.message || options.notValid || this.notValid || this.message || "is not a number";
        }

        // Same logic as above, sort of. Don't bother with comparisons if this
        // doesn't pass.
        if (options.onlyInteger && !v.isInteger(value)) {
            return options.message || options.notInteger || this.notInteger || this.message || "must be an integer";
        }

        for (name in checks) {
            count = options[name];
            if (v.isNumber(count) && !checks[name](value, count)) {
                // This picks the default message if specified
                // For example the greaterThan check uses the message from
                // this.notGreaterThan so we capitalize the name and prepend "not"
                var key = "not" + v.capitalize(name);
                var msg = options[key] || this[key] || this.message || "must be %{type} %{count}";

                errors.push(v.format(msg, {
                    count: count,
                    type: v.prettify(name)
                }));
            }
        }

        if (options.odd && value % 2 !== 1) {
            errors.push(options.notOdd || this.notOdd || this.message || "must be odd");
        }
        if (options.even && value % 2 !== 0) {
            errors.push(options.notEven || this.notEven || this.message || "must be even");
        }

        if (errors.length) {
            return options.message || errors;
        }
    },
    datetime: v.extend(function (value, options) {
        if (!v.isFunction(this.parse) || !v.isFunction(this.format)) {
            throw new Error("Both the parse and format functions needs to be set to use the datetime/date validator");
        }

        // Empty values are fine
        if (!v.isDefined(value)) {
            return;
        }

        options = v.extend({}, this.options, options);

        var err,
            errors = [],
            earliest = options.earliest ? this.parse(options.earliest, options) : NaN,
            latest = options.latest ? this.parse(options.latest, options) : NaN;

        value = this.parse(value, options);

        // 86400000 is the number of seconds in a day, this is used to remove
        // the time from the date
        if (isNaN(value) || options.dateOnly && value % 86400000 !== 0) {
            err = options.notValid || options.message || this.notValid || "must be a valid date";
            return v.format(err, { value: arguments[0] });
        }

        if (!isNaN(earliest) && value < earliest) {
            err = options.tooEarly || options.message || this.tooEarly || "must be no earlier than %{date}";
            err = v.format(err, {
                value: this.format(value, options),
                date: this.format(earliest, options)
            });
            errors.push(err);
        }

        if (!isNaN(latest) && value > latest) {
            err = options.tooLate || options.message || this.tooLate || "must be no later than %{date}";
            err = v.format(err, {
                date: this.format(latest, options),
                value: this.format(value, options)
            });
            errors.push(err);
        }

        if (errors.length) {
            return v.unique(errors);
        }
    }, {
        parse: null,
        format: null
    }),
    date: function date(value, options) {
        options = v.extend({}, options, { dateOnly: true });
        return v.validators.datetime.call(v.validators.datetime, value, options);
    },
    format: function format(value, options) {
        if (v.isString(options) || options instanceof RegExp) {
            options = { pattern: options };
        }

        options = v.extend({}, this.options, options);

        var message = options.message || this.message || "is invalid",
            pattern = options.pattern,
            match;

        // Empty values are allowed
        if (!v.isDefined(value)) {
            return;
        }
        if (!v.isString(value)) {
            return message;
        }

        if (v.isString(pattern)) {
            pattern = new RegExp(options.pattern, options.flags);
        }
        match = pattern.exec(value);
        if (!match || match[0].length != value.length) {
            return message;
        }
    },
    inclusion: function inclusion(value, options) {
        // Empty values are fine
        if (!v.isDefined(value)) {
            return;
        }
        if (v.isArray(options)) {
            options = { within: options };
        }
        options = v.extend({}, this.options, options);
        if (v.contains(options.within, value)) {
            return;
        }
        var message = options.message || this.message || "^%{value} is not included in the list";
        return v.format(message, { value: value });
    },
    exclusion: function exclusion(value, options) {
        // Empty values are fine
        if (!v.isDefined(value)) {
            return;
        }
        if (v.isArray(options)) {
            options = { within: options };
        }
        options = v.extend({}, this.options, options);
        if (!v.contains(options.within, value)) {
            return;
        }
        var message = options.message || this.message || "^%{value} is restricted";
        return v.format(message, { value: value });
    },
    email: v.extend(function (value, options) {
        options = v.extend({}, this.options, options);
        var message = options.message || this.message || "is not a valid email";
        // Empty values are fine
        if (!v.isDefined(value)) {
            return;
        }
        if (!v.isString(value)) {
            return message;
        }
        if (!this.PATTERN.exec(value)) {
            return message;
        }
    }, {
        PATTERN: /^[a-z0-9\u007F-\uffff!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9\u007F-\uffff!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,}$/i
    }),
    equality: function equality(value, options, attribute, attributes) {
        if (!v.isDefined(value)) {
            return;
        }

        if (v.isString(options)) {
            options = { attribute: options };
        }
        options = v.extend({}, this.options, options);
        var message = options.message || this.message || "is not equal to %{attribute}";

        if (v.isEmpty(options.attribute) || !v.isString(options.attribute)) {
            throw new Error("The attribute must be a non empty string");
        }

        var otherValue = v.getDeepObjectValue(attributes, options.attribute),
            comparator = options.comparator || function (v1, v2) {
            return v1 === v2;
        };

        if (!comparator(value, otherValue, options, attribute, attributes)) {
            return v.format(message, { attribute: v.prettify(options.attribute) });
        }
    },

    // A URL validator that is used to validate URLs with the ability to
    // restrict schemes and some domains.
    url: function url(value, options) {
        if (!v.isDefined(value)) {
            return;
        }

        options = v.extend({}, this.options, options);

        var message = options.message || this.message || "is not a valid url",
            schemes = options.schemes || this.schemes || ['http', 'https'],
            allowLocal = options.allowLocal || this.allowLocal || false;

        if (!v.isString(value)) {
            return message;
        }

        // https://gist.github.com/dperini/729294
        var regex = "^" +
        // protocol identifier
        "(?:(?:" + schemes.join("|") + ")://)" +
        // user:pass authentication
        "(?:\\S+(?::\\S*)?@)?" + "(?:";

        var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))";

        if (allowLocal) {
            tld += "?";
        } else {
            regex +=
            // IP address exclusion
            // private & local networks
            "(?!(?:10|127)(?:\\.\\d{1,3}){3})" + "(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})" + "(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})";
        }

        regex +=
        // IP address dotted notation octets
        // excludes loopback network 0.0.0.0
        // excludes reserved space >= 224.0.0.0
        // excludes network & broacast addresses
        // (first & last IP address of each class)
        "(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])" + "(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}" + "(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))" + "|" +
        // host name
        "(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)" +
        // domain name
        "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*" + tld + ")" +
        // port number
        "(?::\\d{2,5})?" +
        // resource path
        "(?:[/?#]\\S*)?" + "$";

        var PATTERN = new RegExp(regex, 'i');
        if (!PATTERN.exec(value)) {
            return message;
        }
    }
};

validate.formatters = {
    detailed: function detailed(errors) {
        return errors;
    },
    flat: v.flattenErrorsToArray,
    grouped: function grouped(errors) {
        var attr;

        errors = v.groupErrorsByAttribute(errors);
        for (attr in errors) {
            errors[attr] = v.flattenErrorsToArray(errors[attr]);
        }
        return errors;
    },
    constraint: function constraint(errors) {
        var attr;
        errors = v.groupErrorsByAttribute(errors);
        for (attr in errors) {
            errors[attr] = errors[attr].map(function (result) {
                return result.validator;
            }).sort();
        }
        return errors;
    }
};

exports._validate = validate;
},{}],12:[function(require,module,exports){
"use strict";

exports.__esModule = true;

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _maxExpireDate = new Date('Fri, 31 Dec 9999 23:59:59 UTC');
var _defaultExpire = _maxExpireDate;

// https://github.com/jeromegn/Backbone.localStorage/blob/master/backbone.localStorage.js#L63
var defaultSerializer = {
    serialize: function serialize(item) {
        return JSON.stringify(item);
    },
    // fix for "illegal access" error on Android when JSON.parse is
    // passed null
    deserialize: function deserialize(data) {
        return data && JSON.parse(data);
    }
};

function _extend(obj, props) {
    for (var key in props) {
        obj[key] = props[key];
    }return obj;
}

/**
 * https://github.com/gsklee/ngStorage/blob/master/ngStorage.js#L52
 *
 * When Safari (OS X or iOS) is in private browsing mode, it appears as
 * though localStorage is available, but trying to call .setItem throws an
 * exception below: "QUOTA_EXCEEDED_ERR: DOM Exception 22: An attempt was
 * made to add something to storage that exceeded the quota."
 */
function _isStorageSupported(storage) {
    var supported = false;
    if (storage && storage.setItem) {
        supported = true;
        var key = '__' + Math.round(Math.random() * 1e7);
        try {
            storage.setItem(key, key);
            storage.removeItem(key);
        } catch (err) {
            supported = false;
        }
    }
    return supported;
}

// get storage instance
function _getStorageInstance(storage) {
    var type = typeof storage === 'undefined' ? 'undefined' : _typeof(storage);
    if (type === 'string' && window[storage] instanceof Storage) {
        return window[storage];
    }
    return storage;
}

function _isValidDate(date) {
    return Object.prototype.toString.call(date) === '[object Date]' && !isNaN(date.getTime());
}

function _getExpiresDate(expires, now) {
    now = now || new Date();

    if (typeof expires === 'number') {
        expires = expires === Infinity ? _maxExpireDate : new Date(now.getTime() + expires);
    } else if (typeof expires === 'string') {
        expires = new Date(expires);
    }

    if (expires && !_isValidDate(expires)) {
        throw new Error('`expires` parameter cannot be converted to a valid Date instance');
    }

    return expires;
}

// http://crocodillon.com/blog/always-catch-localstorage-security-and-quota-exceeded-errors
function _isQuotaExceeded(e) {
    var quotaExceeded = false;
    if (e) {
        if (e.code) {
            switch (e.code) {
                case 22:
                    quotaExceeded = true;
                    break;
                case 1014:
                    // Firefox
                    if (e.name === 'NS_ERROR_DOM_QUOTA_REACHED') {
                        quotaExceeded = true;
                    }
                    break;
            }
        } else if (e.number === -2147024882) {
            // Internet Explorer 8
            quotaExceeded = true;
        }
    }
    return quotaExceeded;
}

// cache item constructor
function CacheItemConstructor(value, exp) {
    // createTime
    this.c = new Date().getTime();
    exp = exp || _defaultExpire;
    var expires = _getExpiresDate(exp);
    // expiresTime
    this.e = expires.getTime();
    this.v = value;
}

function _isCacheItem(item) {
    if ((typeof item === 'undefined' ? 'undefined' : _typeof(item)) !== 'object') {
        return false;
    }
    if (item) {
        if ('c' in item && 'e' in item && 'v' in item) {
            return true;
        }
    }
    return false;
}

// check cacheItem If effective
function _checkCacheItemIfEffective(cacheItem) {
    var timeNow = new Date().getTime();
    return timeNow < cacheItem.e;
}

function _checkAndWrapKeyAsString(key) {
    if (typeof key !== 'string') {
        console.warn(key + ' used as a key, but it is not a string.');
        key = String(key);
    }
    return key;
}

// cache api
var CacheAPI = {

    set: function set(key, value, options) {},

    get: function get(key) {},

    'delete': function _delete(key) {},
    // Try the best to clean All expires CacheItem.
    deleteAllExpires: function deleteAllExpires() {},
    // Clear all keys
    clear: function clear() {},
    // Add key-value item to memcached, success only when the key is not exists in memcached.
    add: function add(key, options) {},
    // Replace the key's data item in cache, success only when the key's data item is exists in cache.
    replace: function replace(key, value, options) {},
    // Set a new options for an existing key.
    touch: function touch(key, exp) {}
};

// cache api
var CacheAPIImpl = {

    set: function set(key, val, options) {

        key = _checkAndWrapKeyAsString(key);

        options = _extend({ force: true }, options);

        if (val === undefined) {
            return this['delete'](key);
        }

        var value = defaultSerializer.serialize(val);

        var cacheItem = new CacheItemConstructor(value, options.exp);
        try {
            this.storage.setItem(key, defaultSerializer.serialize(cacheItem));
        } catch (e) {
            if (_isQuotaExceeded(e)) {
                //data wasn't successfully saved due to quota exceed so throw an error
                this.quotaExceedHandler(key, value, options, e);
            } else {
                console.error(e);
            }
        }

        return val;
    },
    get: function get(key) {
        key = _checkAndWrapKeyAsString(key);
        var cacheItem = null;
        try {
            cacheItem = defaultSerializer.deserialize(this.storage.getItem(key));
        } catch (e) {
            return null;
        }
        if (_isCacheItem(cacheItem)) {
            if (_checkCacheItemIfEffective(cacheItem)) {
                var value = cacheItem.v;
                return defaultSerializer.deserialize(value);
            } else {
                this['delete'](key);
            }
        }
        return null;
    },

    'delete': function _delete(key) {
        key = _checkAndWrapKeyAsString(key);
        this.storage.removeItem(key);
        return key;
    },

    deleteAllExpires: function deleteAllExpires() {
        var length = this.storage.length;
        var deleteKeys = [];
        var _this = this;
        for (var i = 0; i < length; i++) {
            var key = this.storage.key(i);
            var cacheItem = null;
            try {
                cacheItem = defaultSerializer.deserialize(this.storage.getItem(key));
            } catch (e) {}

            if (cacheItem !== null && cacheItem.e !== undefined) {
                var timeNow = new Date().getTime();
                if (timeNow >= cacheItem.e) {
                    deleteKeys.push(key);
                }
            }
        }
        deleteKeys.forEach(function (key) {
            _this['delete'](key);
        });
        return deleteKeys;
    },

    clear: function clear() {
        this.storage.clear();
    },

    add: function add(key, value, options) {
        key = _checkAndWrapKeyAsString(key);
        options = _extend({ force: true }, options);
        try {
            var cacheItem = defaultSerializer.deserialize(this.storage.getItem(key));
            if (!_isCacheItem(cacheItem) || !_checkCacheItemIfEffective(cacheItem)) {
                this.set(key, value, options);
                return true;
            }
        } catch (e) {
            this.set(key, value, options);
            return true;
        }
        return false;
    },

    replace: function replace(key, value, options) {
        key = _checkAndWrapKeyAsString(key);
        var cacheItem = null;
        try {
            cacheItem = defaultSerializer.deserialize(this.storage.getItem(key));
        } catch (e) {
            return false;
        }
        if (_isCacheItem(cacheItem)) {
            if (_checkCacheItemIfEffective(cacheItem)) {
                this.set(key, value, options);
                return true;
            } else {
                this['delete'](key);
            }
        }
        return false;
    },

    touch: function touch(key, exp) {
        key = _checkAndWrapKeyAsString(key);
        var cacheItem = null;
        try {
            cacheItem = defaultSerializer.deserialize(this.storage.getItem(key));
        } catch (e) {
            return false;
        }
        if (_isCacheItem(cacheItem)) {
            if (_checkCacheItemIfEffective(cacheItem)) {
                this.set(key, this.get(key), { exp: exp });
                return true;
            } else {
                this['delete'](key);
            }
        }
        return false;
    }
};

/**
 * Cache Constructor
 */
function CacheConstructor(options) {

    // default options
    var defaults = {
        storage: 'localStorage',
        exp: Infinity //An expiration time, in seconds. default never .
    };

    var opt = _extend(defaults, options);

    var expires = opt.exp;

    if (expires && typeof expires !== 'number' && !_isValidDate(expires)) {
        throw new Error('Constructor `exp` parameter cannot be converted to a valid Date instance');
    } else {
        _defaultExpire = expires;
    }

    var storage = _getStorageInstance(opt.storage);

    var isSupported = _isStorageSupported(storage);

    this.isSupported = function () {
        return isSupported;
    };

    if (isSupported) {

        this.storage = storage;

        this.quotaExceedHandler = function (key, val, options, e) {
            console.warn('Quota exceeded!');
            if (options && options.force === true) {
                var deleteKeys = this.deleteAllExpires();
                console.warn('delete all expires CacheItem : [' + deleteKeys + '] and try execute `set` method again!');
                try {
                    options.force = false;
                    this.set(key, val, options);
                } catch (err) {
                    console.warn(err);
                }
            }
        };
    } else {
        // if not support, rewrite all functions without doing anything
        _extend(this, CacheAPI);
    }
}

CacheConstructor.prototype = CacheAPIImpl;

exports['default'] = CacheConstructor;
},{}],13:[function(require,module,exports){
/* smoothscroll v0.4.0 - 2018 - Dustan Kasten, Jeremias Menichelli - MIT License */
(function () {
  'use strict';

  // polyfill
  function polyfill() {
    // aliases
    var w = window;
    var d = document;

    // return if scroll behavior is supported and polyfill is not forced
    if (
      'scrollBehavior' in d.documentElement.style &&
      w.__forceSmoothScrollPolyfill__ !== true
    ) {
      return;
    }

    // globals
    var Element = w.HTMLElement || w.Element;
    var SCROLL_TIME = 468;

    // object gathering original scroll methods
    var original = {
      scroll: w.scroll || w.scrollTo,
      scrollBy: w.scrollBy,
      elementScroll: Element.prototype.scroll || scrollElement,
      scrollIntoView: Element.prototype.scrollIntoView
    };

    // define timing method
    var now =
      w.performance && w.performance.now
        ? w.performance.now.bind(w.performance)
        : Date.now;

    /**
     * indicates if a the current browser is made by Microsoft
     * @method isMicrosoftBrowser
     * @param {String} userAgent
     * @returns {Boolean}
     */
    function isMicrosoftBrowser(userAgent) {
      var userAgentPatterns = ['MSIE ', 'Trident/', 'Edge/'];

      return new RegExp(userAgentPatterns.join('|')).test(userAgent);
    }

    /*
     * IE has rounding bug rounding down clientHeight and clientWidth and
     * rounding up scrollHeight and scrollWidth causing false positives
     * on hasScrollableSpace
     */
    var ROUNDING_TOLERANCE = isMicrosoftBrowser(w.navigator.userAgent) ? 1 : 0;

    /**
     * changes scroll position inside an element
     * @method scrollElement
     * @param {Number} x
     * @param {Number} y
     * @returns {undefined}
     */
    function scrollElement(x, y) {
      this.scrollLeft = x;
      this.scrollTop = y;
    }

    /**
     * returns result of applying ease math function to a number
     * @method ease
     * @param {Number} k
     * @returns {Number}
     */
    function ease(k) {
      return 0.5 * (1 - Math.cos(Math.PI * k));
    }

    /**
     * indicates if a smooth behavior should be applied
     * @method shouldBailOut
     * @param {Number|Object} firstArg
     * @returns {Boolean}
     */
    function shouldBailOut(firstArg) {
      if (
        firstArg === null ||
        typeof firstArg !== 'object' ||
        firstArg.behavior === undefined ||
        firstArg.behavior === 'auto' ||
        firstArg.behavior === 'instant'
      ) {
        // first argument is not an object/null
        // or behavior is auto, instant or undefined
        return true;
      }

      if (typeof firstArg === 'object' && firstArg.behavior === 'smooth') {
        // first argument is an object and behavior is smooth
        return false;
      }

      // throw error when behavior is not supported
      throw new TypeError(
        'behavior member of ScrollOptions ' +
          firstArg.behavior +
          ' is not a valid value for enumeration ScrollBehavior.'
      );
    }

    /**
     * indicates if an element has scrollable space in the provided axis
     * @method hasScrollableSpace
     * @param {Node} el
     * @param {String} axis
     * @returns {Boolean}
     */
    function hasScrollableSpace(el, axis) {
      if (axis === 'Y') {
        return el.clientHeight + ROUNDING_TOLERANCE < el.scrollHeight;
      }

      if (axis === 'X') {
        return el.clientWidth + ROUNDING_TOLERANCE < el.scrollWidth;
      }
    }

    /**
     * indicates if an element has a scrollable overflow property in the axis
     * @method canOverflow
     * @param {Node} el
     * @param {String} axis
     * @returns {Boolean}
     */
    function canOverflow(el, axis) {
      var overflowValue = w.getComputedStyle(el, null)['overflow' + axis];

      return overflowValue === 'auto' || overflowValue === 'scroll';
    }

    /**
     * indicates if an element can be scrolled in either axis
     * @method isScrollable
     * @param {Node} el
     * @param {String} axis
     * @returns {Boolean}
     */
    function isScrollable(el) {
      var isScrollableY = hasScrollableSpace(el, 'Y') && canOverflow(el, 'Y');
      var isScrollableX = hasScrollableSpace(el, 'X') && canOverflow(el, 'X');

      return isScrollableY || isScrollableX;
    }

    /**
     * finds scrollable parent of an element
     * @method findScrollableParent
     * @param {Node} el
     * @returns {Node} el
     */
    function findScrollableParent(el) {
      var isBody;

      do {
        el = el.parentNode;

        isBody = el === d.body;
      } while (isBody === false && isScrollable(el) === false);

      isBody = null;

      return el;
    }

    /**
     * self invoked function that, given a context, steps through scrolling
     * @method step
     * @param {Object} context
     * @returns {undefined}
     */
    function step(context) {
      var time = now();
      var value;
      var currentX;
      var currentY;
      var elapsed = (time - context.startTime) / SCROLL_TIME;

      // avoid elapsed times higher than one
      elapsed = elapsed > 1 ? 1 : elapsed;

      // apply easing to elapsed time
      value = ease(elapsed);

      currentX = context.startX + (context.x - context.startX) * value;
      currentY = context.startY + (context.y - context.startY) * value;

      context.method.call(context.scrollable, currentX, currentY);

      // scroll more if we have not reached our destination
      if (currentX !== context.x || currentY !== context.y) {
        w.requestAnimationFrame(step.bind(w, context));
      }
    }

    /**
     * scrolls window or element with a smooth behavior
     * @method smoothScroll
     * @param {Object|Node} el
     * @param {Number} x
     * @param {Number} y
     * @returns {undefined}
     */
    function smoothScroll(el, x, y) {
      var scrollable;
      var startX;
      var startY;
      var method;
      var startTime = now();

      // define scroll context
      if (el === d.body) {
        scrollable = w;
        startX = w.scrollX || w.pageXOffset;
        startY = w.scrollY || w.pageYOffset;
        method = original.scroll;
      } else {
        scrollable = el;
        startX = el.scrollLeft;
        startY = el.scrollTop;
        method = scrollElement;
      }

      // scroll looping over a frame
      step({
        scrollable: scrollable,
        method: method,
        startTime: startTime,
        startX: startX,
        startY: startY,
        x: x,
        y: y
      });
    }

    // ORIGINAL METHODS OVERRIDES
    // w.scroll and w.scrollTo
    w.scroll = w.scrollTo = function() {
      // avoid action when no arguments are passed
      if (arguments[0] === undefined) {
        return;
      }

      // avoid smooth behavior if not required
      if (shouldBailOut(arguments[0]) === true) {
        original.scroll.call(
          w,
          arguments[0].left !== undefined
            ? arguments[0].left
            : typeof arguments[0] !== 'object'
              ? arguments[0]
              : w.scrollX || w.pageXOffset,
          // use top prop, second argument if present or fallback to scrollY
          arguments[0].top !== undefined
            ? arguments[0].top
            : arguments[1] !== undefined
              ? arguments[1]
              : w.scrollY || w.pageYOffset
        );

        return;
      }

      // LET THE SMOOTHNESS BEGIN!
      smoothScroll.call(
        w,
        d.body,
        arguments[0].left !== undefined
          ? ~~arguments[0].left
          : w.scrollX || w.pageXOffset,
        arguments[0].top !== undefined
          ? ~~arguments[0].top
          : w.scrollY || w.pageYOffset
      );
    };

    // w.scrollBy
    w.scrollBy = function() {
      // avoid action when no arguments are passed
      if (arguments[0] === undefined) {
        return;
      }

      // avoid smooth behavior if not required
      if (shouldBailOut(arguments[0])) {
        original.scrollBy.call(
          w,
          arguments[0].left !== undefined
            ? arguments[0].left
            : typeof arguments[0] !== 'object' ? arguments[0] : 0,
          arguments[0].top !== undefined
            ? arguments[0].top
            : arguments[1] !== undefined ? arguments[1] : 0
        );

        return;
      }

      // LET THE SMOOTHNESS BEGIN!
      smoothScroll.call(
        w,
        d.body,
        ~~arguments[0].left + (w.scrollX || w.pageXOffset),
        ~~arguments[0].top + (w.scrollY || w.pageYOffset)
      );
    };

    // Element.prototype.scroll and Element.prototype.scrollTo
    Element.prototype.scroll = Element.prototype.scrollTo = function() {
      // avoid action when no arguments are passed
      if (arguments[0] === undefined) {
        return;
      }

      // avoid smooth behavior if not required
      if (shouldBailOut(arguments[0]) === true) {
        // if one number is passed, throw error to match Firefox implementation
        if (typeof arguments[0] === 'number' && arguments[1] === undefined) {
          throw new SyntaxError('Value could not be converted');
        }

        original.elementScroll.call(
          this,
          // use left prop, first number argument or fallback to scrollLeft
          arguments[0].left !== undefined
            ? ~~arguments[0].left
            : typeof arguments[0] !== 'object' ? ~~arguments[0] : this.scrollLeft,
          // use top prop, second argument or fallback to scrollTop
          arguments[0].top !== undefined
            ? ~~arguments[0].top
            : arguments[1] !== undefined ? ~~arguments[1] : this.scrollTop
        );

        return;
      }

      var left = arguments[0].left;
      var top = arguments[0].top;

      // LET THE SMOOTHNESS BEGIN!
      smoothScroll.call(
        this,
        this,
        typeof left === 'undefined' ? this.scrollLeft : ~~left,
        typeof top === 'undefined' ? this.scrollTop : ~~top
      );
    };

    // Element.prototype.scrollBy
    Element.prototype.scrollBy = function() {
      // avoid action when no arguments are passed
      if (arguments[0] === undefined) {
        return;
      }

      // avoid smooth behavior if not required
      if (shouldBailOut(arguments[0]) === true) {
        original.elementScroll.call(
          this,
          arguments[0].left !== undefined
            ? ~~arguments[0].left + this.scrollLeft
            : ~~arguments[0] + this.scrollLeft,
          arguments[0].top !== undefined
            ? ~~arguments[0].top + this.scrollTop
            : ~~arguments[1] + this.scrollTop
        );

        return;
      }

      this.scroll({
        left: ~~arguments[0].left + this.scrollLeft,
        top: ~~arguments[0].top + this.scrollTop,
        behavior: arguments[0].behavior
      });
    };

    // Element.prototype.scrollIntoView
    Element.prototype.scrollIntoView = function() {
      // avoid smooth behavior if not required
      if (shouldBailOut(arguments[0]) === true) {
        original.scrollIntoView.call(
          this,
          arguments[0] === undefined ? true : arguments[0]
        );

        return;
      }

      // LET THE SMOOTHNESS BEGIN!
      var scrollableParent = findScrollableParent(this);
      var parentRects = scrollableParent.getBoundingClientRect();
      var clientRects = this.getBoundingClientRect();

      if (scrollableParent !== d.body) {
        // reveal element inside parent
        smoothScroll.call(
          this,
          scrollableParent,
          scrollableParent.scrollLeft + clientRects.left - parentRects.left,
          scrollableParent.scrollTop + clientRects.top - parentRects.top
        );

        // reveal parent in viewport unless is fixed
        if (w.getComputedStyle(scrollableParent).position !== 'fixed') {
          w.scrollBy({
            left: parentRects.left,
            top: parentRects.top,
            behavior: 'smooth'
          });
        }
      } else {
        // reveal element in viewport
        w.scrollBy({
          left: clientRects.left,
          top: clientRects.top,
          behavior: 'smooth'
        });
      }
    };
  }

  if (typeof exports === 'object' && typeof module !== 'undefined') {
    // commonjs
    module.exports = { polyfill: polyfill };
  } else {
    // global
    polyfill();
  }

}());

},{}],14:[function(require,module,exports){
"use strict";

var _index = require("andy-aui/lib/index");

var _aui = _interopRequireWildcard(_index);

var _dom = require("andy-aui/lib/dom");

require("./dev");

var _smoothscrollPolyfill = require("smoothscroll-polyfill");

var _smoothscrollPolyfill2 = _interopRequireDefault(_smoothscrollPolyfill);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

(0, _dom.polyfill)();

_smoothscrollPolyfill2.default.polyfill();

_aui.getNaturalSize = _dom.getNaturalSize;
window.aui = _aui;
// window.aui.isIE9 = document.documentMode&&document.documentMode===9;;
// window.aui.isIE10 = eval("/*@cc_on!@*/false") && document.documentMode === 10;
// window.aui.isIE11 = !window.aui.isIE10 && !!window.MSInputMethodContext && window.navigator.msPointerEnabled;;

// aui.utils.run = function (exp, variables) {
//   let ret = "";
//   for (let variablekey in variables) {
//       ret += `var ${variablekey} = ${variables[variablekey]};`;
//   }
//   ret += `return ${exp}`;
//   return new Function(ret)();
// };

// window.aui.AuifindSelectorAll = function (root, selector) {
//     if (!root || root === null) {
//         return;
//     }
//     if (/(^\s*|,\s*)>/.test(selector)) {
//         if (!root.id) {
//             root.id = 'ID_' + new Date().getTime();
//             var removeId = true;
//         }
//         selector = selector.replace(/(^\s*|,\s*)>/g, '$1#' + root.id + ' >');
//         var result = document.querySelectorAll(selector);
//         if (removeId) {
//             root.id = null;
//         }
//         return result;
//     } else {
//         return root.querySelectorAll(selector);
//     }
// };

// window.AuifindSelector = function (root, selector) {
//     var res = window.aui.AuifindSelectorAll(root, selector);
//     if (res.length < 1) {
//         return null;
//     }
//     return res[0];
// };


// window.aui.getNaturalSize = function(img){
//     var naturalSize ={};
//     if(img.naturalWidth && img.naturalHeight){
//         naturalSize.width = img.naturalWidth;
//         naturalSize.height = img.naturalHeight;
//     }else{
//         // var image = new Image();
//         window.global_hack_image.src = img.src;
//         naturalSize.width = window.global_hack_image.width;
//         naturalSize.height = window.global_hack_image.height;
//     }
//     return naturalSize;
// };

// window.aui.getAttribute = function (ele, name, defaultval) {
//     var ret = ele.getAttribute(name);
//     if (ret == null) {
//         if (defaultval) {
//             return defaultval;
//         }
//         return "";
//     }
//     return ret;
// };

// window.aui.addOnceClass = function (ele, name) {
//     if (!ele.classList.contains(name)) {
//         ele.classList.add(name)
//     }
// };

// window.aui.removeOnceClass = function (ele, name) {
//     if (ele.classList.contains(name)) {
//         ele.classList.remove(name)
//     }
// };
},{"./dev":15,"andy-aui/lib/dom":4,"andy-aui/lib/index":7,"smoothscroll-polyfill":13}],15:[function(require,module,exports){
"use strict";

(function () {
    function defineCustomElement(name, defines) {
        document.registerElement(name, {
            prototype: Object.create(HTMLElement.prototype, defines)
        });
    };

    var matchExp = /\[\[([^\[\]]+)\]\]/g;

    var nextTick = function nextTick(cb) {
        cb();
    };

    var parseTemplate = function parseTemplate(defines, self, html) {
        return html.replace(matchExp, function ($match, p1) {
            var ret = p1;
            if (!defines.computed) {
                defines.computed = {
                    $context: self
                };
            } else {
                defines.computed["$context"] = self;
            }
            if (aui && aui.utils && defines.computed) {
                ret = aui.utils.run(ret, defines.computed);
            }
            return ret;
        });
    };

    if (window && window.Vue) {
        nextTick = window.Vue.nextTick;
    }

    document.auiDefineElement = function (is) {
        var defines = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

        var template = function template() {
            return "";
        };
        if (defines["template"] && {}.toString.call(defines["template"]) === '[object Function]') {
            template = defines["template"];
        }
        if (!defines.created) {
            defines.created = function () {};
        }

        if (!defines.attached) {
            defines.attached = function () {};
        }

        if (!defines.attrChanged) {
            defines.attrChanged = function () {};
        }

        defineCustomElement(is, {
            createdCallback: { value: function value() {
                    var self = this;
                    self.$ele = {};
                    for (var propkey in defines.props) {
                        var isCallbackfromprop = defines.props[propkey]["observerProp"] || false;
                        if (isCallbackfromprop) {
                            var s = isCallbackfromprop(self);
                            if (!s.$key) {
                                s.$key = propkey;
                            }
                            Object.defineProperty(self, s.$key, s);
                        }
                    }
                    nextTick(function () {
                        if (defines.beforeTemplate) {
                            defines.beforeTemplate.bind(self)(self);
                        }
                        self.innerHTML = parseTemplate(defines, self, template(self));
                        defines.created.bind(self)(self);
                        for (var propkey in defines.props) {
                            var attrName = defines.props[propkey]["attr"] || propkey;
                            if (defines.props[propkey]["afterCreated"]) {
                                defines.props[propkey]["afterCreated"](self, self.auiGetAttribute(attrName));
                            }
                        }
                    });
                } },
            attachedCallback: { value: function value() {
                    var self = this;
                    nextTick(function () {
                        defines.attached.bind(this)(self);
                    });
                } },
            attributeChangedCallback: { value: function value(name, oldval, newval) {
                    var self = this;
                    nextTick(function () {
                        if (defines.props && defines.props[name]) {
                            defines.props[name]["observer"](self, oldval, newval);
                        }
                        defines.attrChanged.bind(this)(self, name, oldval, newval);
                    });
                } }
        });

        // document.createElement(is);
    };
})();
},{}],16:[function(require,module,exports){
"use strict";

require("../src/browser.common");
},{"../src/browser.common":14}]},{},[16])